//
//  SongsListTableViewCell.m
//  WXMusic
//
//  Created by 漫步人生路 on 15/9/2.
//  Copyright (c) 2015年 漫步人生路. All rights reserved.
//

#import "SongsListTableViewCell.h"

@implementation SongsListTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.numberLabel = [[UILabel alloc]initWithFrame:CGRectMake(25, 15, 20, 10)];
        self.lineView = [[UIView alloc]initWithFrame:CGRectMake(25, self.numberLabel.frame.size.height + 30, kWidth - 50, 0.5)];
        self.songLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.numberLabel.frame.origin.x + 25, 10, kWidth - 100, 20)];
        self.sqImage = [[UIImageView alloc]initWithFrame:CGRectMake(self.numberLabel.frame.origin.x + 25, self.songLabel.frame.origin.y + 15, 15, 15)];
        self.singer = [[UILabel alloc]initWithFrame:CGRectMake(self.sqImage.frame.origin.x + 18, self.songLabel.frame.origin.y + 16, self.songLabel.frame.size.width, 15)];
        [self setUpCell];
    }
    return self;
}
- (void)setUpCell
{
    self.numberLabel.textColor = [UIColor whiteColor];
    self.numberLabel.font = [UIFont fontWithName:@"Bradley Hand" size:14.0];
    self.lineView.backgroundColor = [UIColor whiteColor];
    self.songLabel.textColor = [UIColor whiteColor];
    self.songLabel.font = [UIFont fontWithName:@"Courier-Bold" size:13.0];
    self.sqImage.image = [UIImage imageNamed:@"ic_playlist_sq"];
    self.singer.font = [UIFont fontWithName:@"CourierNewPSMT" size:11.0];
    self.singer.textColor = [UIColor whiteColor];
    [self.contentView addSubview:self.numberLabel];
    [self.contentView addSubview:self.lineView];
    [self.contentView addSubview:self.songLabel];
    [self.contentView addSubview:self.sqImage];
    [self.contentView addSubview:self.singer];
}
- (void)setValueWithModel:(SongsListModel *)songsListModel;
{
    self.songLabel.text = songsListModel.title;
    self.singer.text = songsListModel.author;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
